package interfaces;

import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;
import java.util.Vector;

import valueObjects.game.Player;
import exception.game.SaveFileNotFoundException;
import exception.login.AlreadyLoggedInException;
import exception.login.NotLoggedInException;

public interface ILoginManagement extends Remote, Serializable {

	/**
	 * Checks the login with the given username and password.
	 * Returns a player if successful or throws an exception.
	 * @param username
	 * @param password
	 * @return
	 * @throws NotLoggedInException
	 * @throws AlreadyLoggedInException 
	 */
	public Player checkLogin(String username, String password)
			throws NotLoggedInException, RemoteException, AlreadyLoggedInException;

	/**
	 * Returns a list of players that are loggedin
	 * @return
	 * @throws RemoteException
	 */
	public Vector<Player> getLoggedInPlayers() throws RemoteException;

	public List<String> savegames(Vector<Player> loggedInPlayers) throws RemoteException;

	public IGameManagement loadGame(Vector<Player> loggedInPlayers,
			String string) throws SaveFileNotFoundException, RemoteException;

}